package cn.tedu.zhyl.bed.controller;

import cn.tedu.zhyl.base.response.JsonResult;
import cn.tedu.zhyl.base.response.StatusCode;
import cn.tedu.zhyl.bed.pojo.vo.BedVO;
import cn.tedu.zhyl.bed.service.BedService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 董代恒
 * @version 1.0
 */
@RestController
@RequestMapping("/bed")
public class BedController {
    @Autowired
    private BedService bedService;

    @GetMapping
    public JsonResult getBedAll(){
        List<BedVO> bedVO=bedService.getAll();
        return JsonResult.build(bedVO, StatusCode.SUCCESS_OPERATION);
    }


}
